﻿using System;

namespace DataCore.DomainObjects
{
    [Serializable]
    public class AtributeType : DomainObject<long>
    {
        private String _name = "";

        private Type _atrType;
        
        public Type AtrType
        {
            get  {
                return _atrType;
            }
            set {
                _atrType = value;
            }
        }

        public AtributeType()
        {
            _name = "";
        }

        public AtributeType(String name)
        {
            _name = name;
        }

        public String TypeName
        {
            get { return _name; }
            set{}
        }

        public override string ToString()
        {
            return _name;
        }

        public override int GetHashCode()
        {
            int m = 23;
            return String.Concat(m * 17,
                _name != null ? _name.GetHashCode().ToString() : "0",
                _atrType != null ? _atrType.GetHashCode().ToString() : "0").GetHashCode();
        }

        public override void CopyFrom(DomainObject<long> T)
        {
            throw new NotImplementedException();
        }
    }
}
